![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
check-ends-with-period
Advanced tools
Check the text is ends with period mark.
Install with npm:
npm install check-ends-with-period
/**
* Check ends with period.
* @param {string} lineText
* @param {string[]} [periodMarks]
* @param {boolean} [allowExceptionMark] often used at end.
* @param {boolean} [allowEmoji]
* @returns {{valid: boolean, periodMark: string, index: number}}
*
* `index` is index value of last character.
* If last character is a parts of periodMarks, `index` is the position of periodMark.
* If last character is not a parts of periodMarks, `index` is the position of the last character.
* If last character is white space, `index` is the position of starting of white space.
*/
const checkEndsWithPeriod = function(lineText, {
periodMarks = ["。", "."],
allowExceptionMark = true,
allowEmoji = false,
} = {}) {
}
const checkEndsWithPeriod = require("check-ends-with-period");
// valid: periodMark
checkEndsWithPeriod("text.", {
periodMarks: ["."]
});
/**
{
valid: true,
periodMark: ".",
index: 4
}
*/
// invalid: forget periodMark
checkEndsWithPeriod("text");
/**
{
valid: false,
periodMark: "t",
index: 3
}
*/
// invalid: white space
checkEndsWithPeriod("text ");
/*
{
valid: false,
periodMark: " ",
index: 4
}
*/
// valid: allow emoji option
checkEndsWithPeriod("text❌", {
allowEmoji: true
});
/*
{
valid: true,
periodMark: "❌",
index: 4
}
*/
See Releases page.
Install devDependencies and Run npm test
:
npm i -d && npm test
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT © azu
FAQs
Check the text is ends with period mark.
The npm package check-ends-with-period receives a total of 19,598 weekly downloads. As such, check-ends-with-period popularity was classified as popular.
We found that check-ends-with-period demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.